<template>
    <div>
        <van-tabs v-model:active="active" type="card" style="margin-top: 15px;">
            <van-tab title="精选">
                <MessageItem 
                v-for="item in bata"
                :items="item"
                :key="item.content_id"
                ></MessageItem>
            </van-tab>
            
        </van-tabs>
    </div>
    <van-back-top style="margin-bottom: 10%;" />
</template>

<script setup>
import { useRouter } from 'vue-router';
import { createApp,ref ,onMounted ,reactive} from 'vue';
import { Tab, Tabs } from 'vant';
import MessageItem from '@/components/MessageItem.vue';
import httpApi from '@/http';
const router = useRouter()
const app = createApp();
const bata = reactive([]);

    onMounted(() => {
      httpApi.liveApi.queryByconslist({ page:1,pagesize:10 }).then((res) => {
        console.log("加载详情：", res);
        bata.push(...res.data.data.result)
        console.log(bata.consultation_id)
        

      });
    }); 
app.use(Tab);
app.use(Tabs);
</script>
<style lang="scss" scoped>
.info {
    display: flex;
    justify-content: space-between;
    border: 1px solid gray;
    margin: 15px 20px;
    height: 80px;
}
</style>